Skip to content

Instantly share code, notes, and snippets.

[
{
"backcolor": "#141414",
"name": "Adelheid",
"author": "floookay",
"switchMount": "cherry",
"switchBrand": "gateron",
"pcb": true
},
[
@manuarora700
manuarora700 / globe.json
Last active May 20, 2024 14:14
Globe JSON
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dovahkiin98
dovahkiin98 / AutoSizeText.kt
Created October 4, 2021 09:03
AutoSize text implementation in Jetpack Compose
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.BoxWithConstraintsScope
import androidx.compose.foundation.text.InlineTextContent
import androidx.compose.foundation.text.InternalFoundationTextApi
import androidx.compose.foundation.text.TextDelegate
import androidx.compose.material.LocalTextStyle
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier

macOS 10.12 Sonoma and Up Setup

Most things should work in newer versions of macOs with slight tweaks.

Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

@bigodel
bigodel / literate-ledger.org
Last active May 20, 2024 14:11
Literate Ledger Programming(?) with Org-mode

Literate Ledger Programming(?) with Org-mode

Recently, given the economic hardships presented by the current pandemic, coupled with the fact that I have started making my own money, I have started to keep track of my finances. I have always known that I would use Ledger, the command line account tool, to manage my money. Ledger was created by an Emacs maintainer, which hints to a very good Emacs integration, and indeed =ledger-mode= offers a great environment for editing, reporting and modifying Ledger files. But even though it is a pretty complete major mode, I missed being

@lgersman
lgersman / rollup.config.js
Created October 16, 2019 10:27
rollup config for a wordpress plugin including scss/es2018 support
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
//import strip from 'rollup-plugin-strip';
import scss from 'rollup-plugin-scss';
import packageJson from './package.json';
import babel from 'rollup-plugin-babel';
import { terser } from 'rollup-plugin-terser';
const createBrowserConfig = (customizeConfig = () => {}) => {
const config =
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@z5ottu
z5ottu / ListMemcached.md
Created May 20, 2024 14:03 — forked from abullrd/ListMemcached.md
List Memcached Keys
@BlockmanCodes
BlockmanCodes / 01_deployContracts.js
Created November 22, 2022 01:29
Uniswap V3 Flashloans and Arbitrage
const { Contract, ContractFactory, utils, BigNumber } = require("ethers")
const WETH9 = require("../WETH9.json")
const artifacts = {
UniswapV3Factory: require("@uniswap/v3-core/artifacts/contracts/UniswapV3Factory.sol/UniswapV3Factory.json"),
SwapRouter: require("@uniswap/v3-periphery/artifacts/contracts/SwapRouter.sol/SwapRouter.json"),
NFTDescriptor: require("@uniswap/v3-periphery/artifacts/contracts/libraries/NFTDescriptor.sol/NFTDescriptor.json"),
NonfungibleTokenPositionDescriptor: require("@uniswap/v3-periphery/artifacts/contracts/NonfungibleTokenPositionDescriptor.sol/NonfungibleTokenPositionDescriptor.json"),
NonfungiblePositionManager: require("@uniswap/v3-periphery/artifacts/contracts/NonfungiblePositionManager.sol/NonfungiblePositionManager.json"),
WETH9,
@YurinDoctrine
YurinDoctrine / MAKE_OSX_GREAT_AGAIN.md
Last active May 20, 2024 14:05
OS X COMMANDS THAT OPTIMIZE

OSX

Shell scripts to speed up your mac boot time, accelerate loading, and prevent unnecessary throttling.

macOS can be heavily modified using the defaults command. In fact, almost every option is accessible via defaults.

A great way to see what ticking and unticking a box in the Settings App is by using:

defaults read > defaults.pre.txt